<!--
 * @Description: 样式继承
 * @Author: rendc
 * @Date: 2022-09-20 11:12:48
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-20 12:15:58
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>样式继承</title>
  <style>
    body {
      margin: 0;
    }

    #app {
      border: 1px solid red;
      color: red;
    }

    #inner {
      /*继承父元素*/
      border: inherit;
      color: initial;
    }
  </style>
</head>

<body>
  <div id="app">app
    <div id="inner">inner</div>
  </div>
</body>

</html>